import {Flex} from "antd";

class IconComponentProps {
    iconName:string = ""
}

export default function IconComponentTitle({ iconName }: IconComponentProps){

    if (iconName.startsWith("fa")){
        return <Flex vertical justify={"center"} align={"center"} className={"logoBackground"}>
            <i className={iconName}></i>
        </Flex>
        ;
    }

    // 如果图标都不包含fa，那么直接返回该文本本身
    return <Flex vertical justify={"center"} align={"center"} className={"logoBackground"}>
        <span>{iconName}</span>
    </Flex>;
}
